import { TOKEN } from '../constant.js'

const initState = { token: null }

export default function LoadingReducer(preState = initState, action) {
    const { type, data } = action
    switch (type) {
        case TOKEN:
            return { ...preState, token: data }
        default:
            return preState
    }
}